import request from '@/utils/request'

export function getDepartmentApi () {
  return request({
    url: '/company/department'
  })
}

export function delDepartmentAPi (id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}

export function addDepartmentApi (data) {
  return request({
    url: `/company/department`,
    method: 'post',
    data
  })
}

export function queryDepartmentApi (id) {
  return request({
    url: `/company/department/${id}`
  })
}

export function editDepartmentApi (data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
